@Entity
public class CustomerRefactored {
    @Id
    private Long id;	
    private String firstName;
    private String lastName;
    //Stores the reference to Customer object where this object
    //was created from if it was created this way.
    private transient Customer customerRef;
    //Additional properties here ...
    
    //Additional constructor to store reference to class Customer.
    public CustomerRefactored(Customer customer){
        this.customerRef = customer;
    }
    //Standard no argument constructor
    public CustomerRefactored(){ }
    //Reference to new class and therefore table address
    @OneToOne(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
    private Address address = new Address();
    //Getter and setter methods for fields
    public void setAddress(Address address) { this.address = address; }
    public Address getAddress() { return this.address; }
    //Additional setter and getter methods here ...
    
    //Returns the Customer class object
    //Only get method supportet
    public Customer getCustomer(){
        return this.customerRef;
    }      
}